<?php

namespace App\Http\Controllers\Common;

use App\Http\Controllers\Controller;

abstract class CommonController extends Controller {

    protected $getCol = ['*'];

    protected function handleChildren(&$records) {
        foreach ($records as $record) {
            if(count($record['children'])<=0){
                unset($record['children']);
            }else{
                $this->handleChildren($record['children']);
            }
        }
    }


}
